package org.bedracket.pgeg.init;

import net.minecraft.world.item.Item;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import org.bedracket.pgeg.PGEGMod;
import org.bedracket.pgeg.rune.Rune;

import java.util.Locale;
import java.util.function.Supplier;

public class ModRunes {

    public static final DeferredRegister<Item> RUNES =
            DeferredRegister.create(ForgeRegistries.ITEMS, PGEGMod.MOD_ID);


    public static <T extends Rune> RegistryObject<Rune> register(String name, Supplier<T> rune) {
        return RUNES.register(name.toLowerCase(Locale.ROOT), rune);
    }
}
